Open
Conversation
…rs of this type are inherited. This made it possible to slightly reduce code duplication and make the class schema more intuitive and homogeneous.
TonyKatkov89
requested changes
May 29, 2025
Collaborator
TonyKatkov89
left a comment
There was a problem hiding this comment.
significance in MDE should be rechecked
| data: Dataset, | ||
| test_data: Dataset | None = None, | ||
| significance: float = 0.95, | ||
| significance: float = 0.05, |
Collaborator
There was a problem hiding this comment.
Either this should remain 0.95 or we need to change the way how "m" calculated
hypex/comparators/abstract.py
Outdated
Comment on lines
+459
to
+485
|
|
||
|
|
||
| class PowerTesting(Comparator, ABC): | ||
| def __init__( | ||
| self, | ||
| grouping_role: ABCRole | None = None, | ||
| significance: float = 0.95, | ||
| power: float = 0.8, | ||
| key: Any = "", | ||
| ): | ||
| super().__init__( | ||
| compare_by="groups", | ||
| grouping_role=grouping_role, | ||
| key=key, | ||
| ) | ||
| self.significance = significance | ||
| self.power = power | ||
|
|
||
| @classmethod | ||
| @abstractmethod | ||
| def calc( | ||
| cls, data: Dataset, test_data: Dataset | None = None, **kwargs: float | ||
| ) -> float: | ||
| pass | ||
|
|
||
| def execute(self, data: ExperimentData) -> ExperimentData: | ||
| return super().execute(data) |
Collaborator
There was a problem hiding this comment.
Why to move PowerTesting class to abstract comparator file?
And ruff + isort
Collaborator
|
Loving the new imports — super clean! |
The merge-base changed after approval.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.